<?php
/**
 * Created by 荣耀电竞.
 * User: 林子彦 <278805354@qq.com>
 * Date: 2018/7/10 0010
 * Time: 17:12
 */

namespace App\Weixin\Models;


use App\Base\Models\BaseModel;
use Illuminate\Database\Eloquent\SoftDeletes;

class UserScoreLogModel extends BaseModel
{
    use SoftDeletes;
    /**
     * 订单信息表名
     * @var string
     */
    public $table = "user_score_log";
    /**
     * 时间自动
     * @var bool
     */
    public $timestamps = true;
    /**
     * The name of the "created at" column.
     *
     * @var string
     */
    const CREATED_AT = 'create_time';  //修改添加时间字段
    /**
     * The name of the "updated at" column.
     *
     * @var string
     */
    const UPDATED_AT = 'update_time';

    /**
     * 删除
     */
    const DELETED_AT = 'delete_time';
    /**
     * 模型的日期字段保存格式。
     */
    protected $dateFormat = 'U';
    /**
     * 操作名称
     * @param $type
     * @return string
     */
    public function getTypeName($type){
        $typeName='金币无';
        switch ($type){
            case 1:
                $typeName='红包金币';
                break;
            case 2:
                $typeName='分享金币';
                break;
            case 3:
                $typeName='金币支付VIP';
                break;
            case 4:
                $typeName='金币直推收入';
                break;
            case 5:
                $typeName='金币间推收入';
                break;
        }

        return $typeName;
    }



}